Skip to main content

Prepayment

This API allows the generation of prepayments for ongoing contracts, offering several configurations according to the fund and making it easy to run simulations before the prepayment is confirmed. In addition, you can look up the credit position as well as the boleto(s) generated after the prepayment is confirmed.

Credit Position​

Displays information related to a contract's credit on a specific day, useful for checking the contract's situation before and after a possible advance.

// example response:
[
{
"amortization_type": "InstallmentFlow",
"balance_date": "2023-08-02T00:00:00.000Z",
"contract_number": "1247244/HYD",
"currency": "BRL",
"installments": [
{
"amount_at_maturity": 136.1,
"curve_value": 140.62,
"discount": 0,
"installment_number": 1,
"principal": 117.28,
"status_description": "Opened"
}
],
"is_vnp": true,
"position_date": "2023-08-02T00:00:00.000Z",
"trade_id": 11266246
}
]

Fund Configurations​

The fund configurations refer to the different ways and rules in which that fund handles the generation of prepayments. These configurations are set in advance by the internal contract management team, and there may be different types, each with specific criteria. Examples of supported configurations:

allow_partial_prepayment: boolean value indicating whether it is possible to prepay only some of the contract's installments.

allowed_order:

  • ASC: installment prepayment must follow ascending order.
  • DESC: installment prepayment must follow descending order.
  • ANY: installment prepayment may follow any order, as long as it is sequential.

wallet_closing_time: indicates the latest time the prepayment can be requested on the specific day.

allow_vnp_prepayment: boolean value indicating whether it is possible to pay overdue/past-due installments.

future_payment_date: boolean value indicating whether it is possible to make the payment on future days.

minimun_accrual_days: minimum number of days required to issue a prepayment after the contract takes effect.

maximum_prepayment_days_before_due: number of days before the installment's due date during which prepayment is not allowed.

prepayment_method:

  • PREPAYMENT: allows only payment of the installments' full amount.
  • AMORTIZATION: allows partial payment of the installments' amount.

settlement_method: lists the allowed payment types (Boleto, TED, PIX, Direct Debit).

// example configuration:
{
"cge": "6666666",
"id": "00000000-0000-0000-0000-000000000000",
"name": "Name here",
"prepayment": {
"allow_partial_prepayment": false,
"allow_vnp_prepayment": false,
"allowed_order": "ANY",
"closing_time": "23:00:00",
"future_payment_date": true,
"maximum_prepayment_days_before_due": 0,
"minimum_accrual_days": 5,
"prepayment_method": "PREPAYMENT",
"settlement_methods": [
{
"id": 3,
"name": "Boleto",
"short_name": "BOLETO"
}
]
},
"tax_id": "444490909000444",
"texts": {
"AMORTIZATION_ALERT_EMAIL": "name@yourProvider.com",
"AMORTIZATION_ALERT_MESSAGE": "Message body here",
"AMORTIZATION_ALERT_TITLE": "Message title here"
}
}

Simulation​

The prepayment simulation is the step in which the rules are applied according to the fund configurations mentioned above. You must provide the contract number contract_number, the fund identifier fund_tax_id, the installments to be advanced installments, and finally the position date position_date.

// example response:
{
"simulation_identification": "FDA4162DA3999EB0570307A7356110F5-638101491065224458",
"value_to_pay": 244.18
}

Confirmation​

After a successful simulation, you obtain the simulation_identification value, which is required to confirm the prepayment generation, at which point the advance becomes effective.

// example response:
{
"barcode_number": 2.0890001091e+46
}

Boletos​

After a prepayment is confirmed, you can look up the boleto generated for payment; just provide the simulation number simulation_identification.

// example response:
string (base64)

Available Resources​

The Prepayment API resources are available in the API Reference.

📘 API Reference